/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.edu.upc.dew.sisrest.dao.hibernate;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import pe.edu.upc.dew.sisrest.dao.PlatoMenuDao;
import pe.edu.upc.dew.sisrest.model.Platomenu;
import pe.edu.upc.dew.sisrest.model.PlatomenuId;

@Repository
public class PlatoMenuDaoHibernate extends HibernateDaoSupport implements PlatoMenuDao {

    @Autowired
    public PlatoMenuDaoHibernate(SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
    }

    @Override
    public void guardarPlatoMenu(Platomenu platomenu) {
      getHibernateTemplate().saveOrUpdate(platomenu);
    }
    
}
